package com.shangxian.giveithome.service.impl;

import com.shangxian.giveithome.entity.ComplaintDO;
import com.shangxian.giveithome.mapper.ComplaintMapper;
import com.shangxian.giveithome.service.ComplaintService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

@Service
public class ComplaintServiceImpl implements ComplaintService {

    @Resource
    private ComplaintMapper complaintMapper;


    @Override
    public Long saveComplaint(ComplaintDO complaint) {
        complaint.setCreateTime(new Date());
        return complaintMapper.save(complaint);
    }
}
